package com.genymobile.scrcpy;

import com.fasterxml.jackson.annotation.JsonProperty;

/* loaded from: classes2.dex */
public class SettingsException extends Exception {
    private static String createMessage(String method, String table, String key, String value) {
        String str;
        StringBuilder sb = new StringBuilder();
        sb.append("Could not access settings: ");
        sb.append(method);
        sb.append(" ");
        sb.append(table);
        sb.append(" ");
        sb.append(key);
        if (value != null) {
            str = " " + value;
        } else {
            str = JsonProperty.USE_DEFAULT_NAME;
        }
        sb.append(str);
        return sb.toString();
    }

    public SettingsException(String method, String table, String key, String value, Throwable cause) {
        super(createMessage(method, table, key, value), cause);
    }
}